Conventionally, there is technology to reduce fluctuation of coordinate data outputted from a coordinate input device such as a touch panel. For example, there is conventional technology in which weighted averaging of last corrected coordinate data and latest coordinate data is performed to generate latest corrected coordinate data.
However, the technology to reduce fluctuation of coordinate data has a fundamental demerit that responsiveness to an operation of an operator decreases. Thus, when the moving speed and the moving direction of the coordinate are calculated on the basis of the corrected coordinate data, the calculated moving direction substantially agrees with that of an actual input operation of the operator as a result of reduction of fluctuation of the coordinate data, but the calculated moving speed tends to diverge from that of the actual input operation of the operator due to decrease of the responsiveness.
It is a feature of the technology disclosed herein to provide a computer-readable storage medium, a coordinate processing apparatus, a coordinate processing system, and a coordinate processing method which can appropriately process input coordinate data outputted from a coordinate input device.
The feature described above is attained by, for example, the following configuration examples.
A first configuration example is a computer-readable storage medium having stored therein a coordinate processing program for processing input coordinate data outputted from a coordinate input device. The coordinate processing program causes a computer to operate as: a second coordinate series calculator configured to calculate, on the basis of a first coordinate series indicated by the input coordinate data, a second coordinate series which represents an input trajectory having a shape smoother than a shape of an input trajectory represented by the first coordinate series; a moving amount calculator configured to calculate a moving amount of a coordinate on the basis of the first coordinate series; a moving direction calculator configured to calculate a moving direction of the coordinate on the basis of the second coordinate series; and a processing section configured to perform predetermined processing by using the moving amount calculated by the moving amount calculator and the moving direction calculated by the moving direction calculator.
The “coordinate input device” may be any pointing device which is capable of outputting input coordinate data, and is typically a touch panel. The “second coordinate series” suffices to be any coordinate series which represents a shape smoother than the shape of the input trajectory represented by the first coordinate series, and, for example, a following coordinate which follows a target coordinate which is set on the basis of the input coordinate data may be calculated as a coordinate of the second coordinate series, or an average (an arithmetic average, a weighted average, or the like) of a plurality of coordinates included in the first coordinate series may be calculated as a coordinate of the second coordinate series.
The coordinate processing program can be stored in any computer-readable storage medium (e.g., a flexible disc, a hard disk, an optical disc, a magneto-optical disc, a CD-ROM, a CD-R, a magnetic tape, a semiconductor memory card, a ROM, a RAM, etc.).
The moving amount calculator may calculate the moving amount on the basis of at least a distance between a latest coordinate of the first coordinate series and a coordinate immediately previous to the latest coordinate.
Further, the moving direction calculator may calculate the moving direction on the basis of a direction of a straight line connecting a latest coordinate of the second coordinate series to a coordinate immediately previous to the latest coordinate.
Further, the second coordinate series calculator may calculate, as a coordinate of the second coordinate series, a following coordinate which follows a target coordinate which is set on the basis of the input coordinate data.
Further, the second coordinate series calculator may calculate, as a coordinate of the second coordinate series, a following coordinate which follows the target coordinate at a predetermined rate.
Further, the second coordinate series calculator may update the following coordinate at all times such that the following coordinate approaches the target coordinate by a predetermined rate of a distance from the following coordinate to the target coordinate.
Further, the target coordinate may be an allowance coordinate which, when being distant from an input coordinate indicated by the input coordinate data by more than a predetermined distance, moves toward the input coordinate so as to be located at a position away from the input coordinate by the predetermined distance.
Further, the processing section may include a movement vector generator configured to generate a movement vector indicating a moving amount and a moving direction of a coordinate, by using the moving amount calculated by the moving amount calculator and the moving direction calculated by the moving direction calculator.
Further, the processing section may include a third coordinate series calculator configured to calculate a third coordinate series by using the moving amount calculated by the moving amount calculator and the moving direction calculated by the moving direction calculator.
Further, the processing section may include a coordinate complementation section configured to complement the input coordinate data by using the moving amount calculated by the moving amount calculator and the moving direction calculated by the moving direction calculator, when output of the input coordinate data from the coordinate input device is temporarily interrupted.
Further, the processing section may perform the predetermined processing in real time in accordance with output of the input coordinate data from the coordinate input device.
A second configuration example is a coordinate processing apparatus for processing input coordinate data outputted from a coordinate input device. The coordinate processing apparatus comprises: a second coordinate series calculator configured to calculate, on the basis of a first coordinate series indicated by the input coordinate data, a second coordinate series which represents an input trajectory having a shape smoother than a shape of an input trajectory represented by the first coordinate series; a moving amount calculator configured to calculate a moving amount of a coordinate on the basis of the first coordinate series; a moving direction calculator configured to calculate a moving direction of the coordinate on the basis of the second coordinate series: and a processing section configured to perform predetermined processing by using the moving amount calculated by the moving amount calculator and the moving direction calculated by the moving direction calculator.
A third configuration example is a coordinate processing system for processing input coordinate data outputted from a coordinate input device. The coordinate processing system comprises: a second coordinate series calculator configured to calculate, on the basis of a first coordinate series indicated by the input coordinate data, a second coordinate series which represents an input trajectory having a shape smoother than a shape of an input trajectory represented by the first coordinate series; a moving amount calculator configured to calculate a moving amount of a coordinate on the basis of the first coordinate series; a moving direction calculator configured to calculate a moving direction of the coordinate on the basis of the second coordinate series; and a processing section configured to perform predetermined processing by using the moving amount calculated by the moving amount calculator and the moving direction calculated by the moving direction calculator.
A fourth configuration example is a coordinate processing method executed by a computer of a coordinate processing system for processing input coordinate data outputted from a coordinate input device. The coordinate processing method comprises the steps of: calculating, on the basis of a first coordinate series indicated by the input coordinate data, a second coordinate series which represents an input trajectory having a shape smoother than a shape of an input trajectory represented by the first coordinate series; calculating a moving amount of a coordinate on the basis of the first coordinate series; calculating a moving direction of the coordinate on the basis of the second coordinate series; and performing predetermined processing by using the calculated moving amount and the calculated moving direction.
According to the technology, it is possible to appropriately process input coordinate data outputted from a coordinate input device.
These and other objects, features, aspects and advantages of the technology will become more apparent from the following detailed description of non-limiting example embodiments when taken in conjunction with the accompanying drawings.